package com.woniuxy.microsysserver.service.impl;
import com.woniuxy.microsysserver.dao.CouponDao;
import com.woniuxy.microsysserver.dao.FortuneCarDao;
import com.woniuxy.microsysserver.entity.CouponEntity;
import com.woniuxy.microsysserver.entity.FortuneCarEntity;
import com.woniuxy.microsysserver.service.CouponService;
import com.woniuxy.microsysserver.service.FortuneCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Auther: wuson  <br/>
 * Date: 2021/3/11:19:51  <br/>
 * Description:
 */
@Service
public class CouponServiceImpl implements CouponService {
    @Autowired(required = false)
    private CouponDao couponDao;

    @Override
    public int addOne(CouponEntity couponEntity) {
        int state = couponDao.addOne(couponEntity);
        return state;
    }

    @Override
    public List<CouponEntity> selectAll() {
        List<CouponEntity> couponEntities = couponDao.selectAll();
        return couponEntities;
    }

    @Override
    public int updateOne(CouponEntity couponEntity) {
        int state = couponDao.updateOne(couponEntity);
        return state;
    }

    @Override
    public int deleteOne(int id) {
        int state = couponDao.deleteOne(id);
        return state;
    }

}
